package com.java.crazy.part5;

import com.java.crazy.base.BaseClass;
import com.java.crazy.part5.类与对象.AnimalBean;
import com.java.crazy.part5.类与对象.ManBean;
import com.java.crazy.part5.类与对象.Person;

public class TestTwo extends BaseClass {
    public static String TAG = "TestTwo";

    public static void main(String[] args) {
        mainStart2();
    }

    private static void mainStart2() {
        logi("\n当：new AnimalBean");
        AnimalBean animalBean = new AnimalBean();
        animalBean.message();
        logi("\n当：new Person");
        Person person = new Person();
        person.message();
        logi("\n当：new ManBean");
        ManBean manBean = new ManBean();
        manBean.message();
        logi("\n当：AnimalBean animalBean2 = new Person()");
        AnimalBean animalBean2 = new Person();
        logi(TAG, "manBean.TAG=" + manBean.TAG);
        logi(TAG, "person.TAG=" + person.TAG);
        logi(TAG, "animalBean.TAG=" + animalBean.TAG);
        logi(TAG, "animalBean2.TAG=" + animalBean2.TAG);
    }

    private static void mainStart() {
        Person person = new Person();
        logi(person);
        //如果不赋值的话String是null,int为0.
        person.setAge(18);
        person.setName("sixBing");
        person.say(person.getName() + "的信息：");
        person.message();
        Person.stName = "stName";
        //person.stName不提示。是一种不被允许但是可以用的方法。
        logi(Person.stName + "---" + person.stName);
        ManBean manBean = new ManBean();
        manBean.setAge(111);
        manBean.setName("1111");
        manBean.setStrong("1111111111");
        manBean.message();

    }
}
